#ifndef __ROLE_MGR_H__
#define __ROLE_MGR_H__

#include "Protocal/Common.pb.h"
#include "DbExecute.h"

class CAsioTcpLink;

class CRole : public xObjBase
{
public:
	CRole(U64 role_id);

public:
	MYTH::Role	role;
};

//------------------------------------------------------------------------------------------------------
class CRoleMgr
{
	SINGLETON_CLASS(CRoleMgr)
protected:
	CRoleMgr();
	~CRoleMgr();
public:
	void LoadFromDB();

protected:
	CRole* CreateRoleByDB(const CDbExecute::DATA_ROW_MAP& rowData);

protected:
	boost::unordered_map<U64, CRole*>		m_mapRoleList;
};

#endif//__ROLE_MGR_H__